# Fetching a single Story

This endpoint returns structured Story objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the `results` array
and will be indexed by ID in the `stories` top-level JSON key.
Please see our [Response Format](#section/Response-Format) section for more information.

Endpoint: GET /stories/{id}
Version: 1.0.0

## Path parameters:

  - `id` (integer, required)
    The ID of the Model.

## Query parameters:

  - `include` (string)
    Any of the below associations can be included in your request by providing the `include` param, e.g. `include=association1,association2`.
- `ancestors` (Story) - Retrieves all of the tasks that the task is nested under (parents and top-level tasks). The response will include `ancestor_ids`, which references the data in the `stories` top-level key.
- `assigned_role` (Role) - Retrieves the authenticated user’s assigned role for the task. The response will include `assigned_role_id`, which references the data in the `roles` top-level key.
- `assignees` (User) - Retrieves all users assigned to the task, excluding unnamed resources. The response will include `assignee_ids`, which references the data in the `users` top-level key.
- `attachments` (Attachments::PostAttachment) - Retrieves all attachments in the task's posts. The response will include `attachment_ids`, which references the data in the `attachments` top-level key.  Must be used with the `only` parameter.
- `creator` (User) - Retrieves the user who created the task. The response will include `creator_id`, which references the data in the `users` top-level key.
- `current_assignments` (Assignment) - Retrieves all assignments for the task. The response will include `current_assignment_ids`, which references the data in the `assignments` top-level key.
- `custom_field_values` (CustomFieldValue) - Retrieves the task’s custom field values. The response will include `custom_field_value_ids`, which references the data in the `custom_field_values` top-level key.
- `descendants` (Story) - Retrieves all of the subtasks nested under this top-level task. The response will include `descendant_ids`, which references the data in the `stories` top-level key.
- `external_references` (ExternalReference) - Includes references to external integrations for this object.
- `followers` (User) - Retrieves all users following the task. The response will include `follower_ids`, which references the data in the `users` top-level key.
- `google_documents` (GoogleDocument) - Retrieves all Google documents for the task. The response will include `google_document_ids`, which references the data in the `google_documents` top-level key.  Must be used with the `only` parameter.
- `parent` (Story) - Retrieves the parent task that this subtask is nested directly under. The response will include `parent_id`, which references the data in the `stories` top-level key.
- `potential_workspace_resources` (WorkspaceResource) - Retrieves the project's named resources who are not assigned to the task. The response will include `potential_workspace_resource_ids`, which references the data in the `workspace_resources` top-level key.  Must be used with the `only` parameter.
- `potential_workspace_resources_with_unnamed` (WorkspaceResource) - Retrieves all of the project's resources (named and unnamed) who are not assigned to the task. The response will include `potential_workspace_resources_with_unnamed_ids`, which references the data in the `workspace_resources` top-level key.  Must be used with the `only` parameter.
- `replies` (Post) - Retrieves all task posts, except for the first one. The response will include `reply_ids`, which references the data in the `posts` top-level key.  Must be used with the `only` parameter.
- `root` (Story) - Retrieves the top-level task that this subtask is nested under. The response will include `root_id`, which references the data in the `stories` top-level key.
- `source_dependencies` (StoryDependency) - Retrieves all tasks that this task is dependent on. The response will include `source_dependency_ids`, which references the data in the `story_dependencies` top-level key.
- `story_state_changes` (StoryStateChange) - Retrieves all status changes the task has gone through. The response will include `story_state_change_ids`, which references the data in the `story_state_changes` top-level key.  Must be used with the `only` parameter.
- `story_tasks` (StoryTask) - Retrieves all checklist items for the task. The response will include `story_task_ids`, which references the data in the `story_tasks` top-level key.
- `sub_stories` (Story) - Retrieves all direct subtasks of the task. This does not include the subtasks of its direct subtasks. The response will include `sub_story_ids`, which references the data in the `stories` top-level key.
- `tags` (ActsAsTaggableOn::Tag) - Retrieves all tags for the task. The response will include `tag_ids`, which references the data in the `tags` top-level key.
- `target_dependencies` (StoryDependency) - Retrieves all tasks that are dependent on this task. The response will include `target_dependency_ids`, which references the data in the `story_dependencies` top-level key.
- `workspace` (Workspace) - Retrieves the project the task is in. The response will include `workspace_id`, which references the data in the `workspaces` top-level key.
- `workspace_resources` (WorkspaceResource) - Retrieves the named resources who are assigned to the task. The response will include `workspace_resource_ids`, which references the data in the `workspace_resources` top-level key.
- `workspace_resources_with_unnamed` (WorkspaceResource) - Retrieves all of the resources (named and unnamed) assigned to the task. The response will include `workspace_resources_with_unnamed_ids`, which references the data in the `workspace_resources` top-level key.

  - `optional_fields` (array)
    Allows you to request one or more optional fields as an array.

  - `show_deleted` (boolean)
    Returns a deleted story when set to true.

## Response 200:

  - `200` (unknown)
    The Story has been retrieved.

## Response 200 fields (application/json):

  - `count` (integer)

  - `meta` (object)

  - `meta.count` (integer)

  - `meta.page_count` (integer)

  - `meta.page_number` (integer)

  - `meta.page_size` (integer)

  - `results` (array)

  - `results.key` (string)

  - `results.id` (string)

  - `stories` (object)

  - `external_references` (object)

  - `workspace_resources` (object)

  - `workspaces` (object)

  - `users` (object)

  - `assignments` (object)

  - `story_tasks` (object)

  - `tags` (object)

  - `story_state_changes` (object)

  - `posts` (object)

  - `attachments` (object)

  - `story_dependencies` (object)

  - `custom_field_values` (object)

  - `roles` (object)

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 401:

  - `401` (unknown)
    Unauthorized request

## Response 401 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 403:

  - `403` (unknown)
    Forbidden request

## Response 403 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 404:

  - `404` (unknown)
    Page Not Found

## Response 404 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 422:

  - `422` (unknown)
    Unprocessable Entity

## Response 422 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 503:

  - `503` (unknown)
    Service is unavailable

## Response 503 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

